<?php
if (!defined('IN_WONDERSHARE'))
{
	die('Hacking attempt');
}
class FeatureModule 
{
   var $db;
 
   function __construct()
   {
   	$this->db = $GLOBALS['db'];
   }
   function get_feature_info($sql,$type)
   { 
   	$date = array();
	$result = $this->db->query($sql);
	if($type == 'p_feature')
	{
	$arr= array("1","2","3","4","5","6","7","8");
	
	 while($row = $this->db->fetch_array($result))
	 {
	 	
	  if(in_array($row['feature_order'], $arr))
	  {
	   $date[$row['feature_order']] = $row;
	  }
	 }
	}else
	{
	 while($row = $this->db->fetch_array($result))
	 {
	   $date[] = $row;
	 }	
	}
	return  $date;
   }
   function  change_info($sql)
   {
   	$affect = $this->db->query($sql);
   	return  $affect;
   }
}

?>